var t = require;
var e = module;
var o = exports;
var i = this && this.__awaiter ||
    function (t, e, o, i) {
        return new (o || (o = Promise))(function (n, a) {
            function r(t) {
                try {
                    l(i.next(t))
                } catch (e) {
                    a(e)
                }
            }
            function s(t) {
                try {
                    l(i.
                        throw(t))
                } catch (e) {
                    a(e)
                }
            }
            function l(t) {
                var e;
                t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                    t(e)
                })).then(r, s)
            }
            l((i = i.apply(t, e || [])).next())
        })
    },
    n = this && this.__generator ||
        function (t, e) {
            var o, i, n, a, r = {
                label: 0,
                sent: function () {
                    if (1 & n[0]) throw n[1];
                    return n[1]
                },
                trys: [],
                ops: []
            };
            return a = {
                next: s(0),
                throw: s(1),
                return: s(2)
            },
                "function" == typeof Symbol && (a[Symbol.iterator] = function () {
                    return this
                }),
                a;
            function s(t) {
                return function (e) {
                    return l([t, e])
                }
            }
            function l(a) {
                if (o) throw new TypeError("Generator is already executing.");
                for (; r;) try {
                    if (o = 1, i && (n = 2 & a[0] ? i.
                        return : a[0] ? i.
                            throw || ((n = i.
                                return) && n.call(i), 0) : i.next) && !(n = n.call(i, a[1])).done) return n;
                    switch (i = 0, n && (a = [2 & a[0], n.value]), a[0]) {
                        case 0:
                        case 1:
                            n = a;
                            break;
                        case 4:
                            return r.label++,
                            {
                                value: a[1],
                                done: !1
                            };
                        case 5:
                            r.label++,
                                i = a[1],
                                a = [0];
                            continue;
                        case 7:
                            a = r.ops.pop(),
                                r.trys.pop();
                            continue;
                        default: if (!(n = (n = r.trys).length > 0 && n[n.length - 1]) && (6 === a[0] || 2 === a[0])) {
                            r = 0;
                            continue
                        }
                            if (3 === a[0] && (!n || a[1] > n[0] && a[1] < n[3])) {
                                r.label = a[1];
                                break
                            }
                            if (6 === a[0] && r.label < n[1]) {
                                r.label = n[1],
                                    n = a;
                                break
                            }
                            if (n && r.label < n[2]) {
                                r.label = n[2],
                                    r.ops.push(a);
                                break
                            }
                            n[2] && r.ops.pop(),
                                r.trys.pop();
                            continue;
                    }
                    a = e.call(t, r)
                } catch (s) {
                    a = [6, s],
                        i = 0
                } finally {
                        o = n = 0
                    }
                if (5 & a[0]) throw a[1];
                return {
                    value: a[0] ? a[1] : void 0,
                    done: !0
                }
            }
        };
Object.defineProperty(o, "__esModule", {
    value: !0
}),
    o.Util = void 0;
var a = t("GlobalUserData"),
    r = t("GoldFlyAnim"),
    s = t("HallConstant"),
    l = t("Hint"),
    c = t("Global"),
    d = t("ChannelTool"),
    h = t("WXSDK"),
    p = t("CarConstant"),
    u = t("BaseStorage"),
    f = t("GameConstant"),
    m = t("BoxGetView"),
    _ = t("ConfirmRewardPanel"),
    y = t("OPPOSDK"),
    g = t("VIVOSDK"),
    v = t("ParticleEffect"),
    C = t("TimeUtil"),
    b = t("TTSDK"),
    w = t("NativeManager"),
    S = t("AssetsManager"),
    I = t("HttpUtil"),
    B = t("LoadingScene"),
    T = t("HWSdk"); (function (t) {
        var e = function () {
            function t() {
                this._container = new Object,
                    this._length = 0
            }
            return Object.defineProperty(t.prototype, "container", {
                get: function () {
                    return this._container
                },
                enumerable: !1,
                configurable: !0
            }),
                Object.defineProperty(t.prototype, "length", {
                    get: function () {
                        return this._length
                    },
                    enumerable: !1,
                    configurable: !0
                }),
                t.prototype.add = function (t, e) {
                    return this.hasKey(t) || this._length++,
                        this._container[t] = e,
                        e
                },
                t.prototype.forEach = function (t) {
                    for (var e in this._container) if (!t(this._container[e])) return
                },
                t.prototype.forIn = function (t) {
                    for (var e in this._container) t(e)
                },
                t.prototype.valueOf = function () {
                    var t = [];
                    for (var e in this._container) t.push(this._container[e]);
                    return t
                },
                t.prototype.get = function (t) {
                    return this._container[t]
                },
                t.prototype.reset = function (t, e) {
                    this.hasKey(t) ? this._container[t] = e : cc.log("ObjDictionary:varning you reset a not exist key")
                },
                t.prototype.hasKey = function (t) {
                    return this._container.hasOwnProperty(t)
                },
                t.prototype.remove = function (t) {
                    if (this._container.hasOwnProperty(t)) {
                        var e = this._container[t];
                        return this._container[t] = null,
                            delete this._container[t],
                            this._length--,
                            e
                    }
                    return null
                },
                t.prototype.clear = function () {
                    this._length = 0,
                        this._container = null,
                        this._container = new Object
                },
                t
        }();
        t.Dictionary = e;
        var o = function () {
            function t() {
                this._nodePool = new Map
            }
            return t.prototype.getNodeFromNodePool = function (t, e) {
                if (this._nodePool.has(t) || this._nodePool.set(t, new cc.NodePool), this._nodePool.get(t).size() > 0) {
                    var o = this._nodePool.get(t).get();
                    return o.opacity = 255,
                        o
                }
                return cc.instantiate(e)
            },
                t.prototype.putNodeIntoNodePool = function (t, e) {
                    this._nodePool.has(t) && (e.opacity = 0, this._nodePool.get(t).put(e))
                },
                t.prototype.clearNodePool = function () {
                    this._nodePool.forEach(function (t) {
                        t.clear()
                    }),
                        this._nodePool.clear()
                },
                t
        }();
        function A() {
            return !!cc.sys.isNative
        }
        t.objectPool = new o,
            t.respownStarParticle = function (e, o) {
                void 0 === o && (o = 15);
                for (var i = 0; i < o; i++) {
                    var n = t.objectPool.getNodeFromNodePool(c.PoolKey.star, a.default.pfb_starParticle);
                    if (n) {
                        n.getComponent(v.default).init(V(0, 360), V(500, 1e3), .5, cc.Color.WHITE);
                        var r = cc.find("Canvas").convertToNodeSpaceAR(e);
                        n.setPosition(r),
                            n.scale = .3,
                            n.parent = cc.find("Canvas")
                    }
                }
            },
            t.find = function (t, e) {
                for (var o = null,
                    i = 0,
                    n = e.split("/"); i < n.length; i++) {
                    var a = n[i];
                    o = o ? o.getChildByName(a) : t.getChildByName(a)
                }
                return o
            },
            t.sendMsgToOpendata = function (t, e) {
                var o = Math.round(new Date().getTime() / 1e3),
                    i = JSON.stringify({
                        wxgame: {
                            score: e,
                            update_time: o
                        }
                    }),
                    n = new Array;
                n.push({
                    key: t,
                    value: i,
                    timer: o
                });
                var a = window.wx || window.tt || window.swan,
                    r = a && a.getOpenDataContext();
                r && r.postMessage({
                    type: "SET",
                    data: n,
                    timer: o
                })
            },
            t.isNative = A,
            t.isAndroid = function () {
                return !(!cc.sys.isNative || cc.sys.os != cc.sys.OS_ANDROID)
            },
            t.ArrayQueue = function () {
                var t = [];
                this.push = function (e) {
                    return t.push(e),
                        !0
                },
                    this.pop = function () {
                        return t.shift()
                    },
                    this.getFront = function () {
                        return t[0]
                    },
                    this.getRear = function () {
                        return t[t.length - 1]
                    },
                    this.clear = function () {
                        t = []
                    },
                    this.size = function () {
                        return length
                    }
            };
        var G = function () {
            function t() {
                this.arr = []
            }
            return t.prototype.push = function (t) {
                return this.arr.push(t),
                    !0
            },
                t.prototype.pop = function () {
                    return this.arr.shift()
                },
                t.prototype.getFront = function () {
                    return this.arr[0]
                },
                t.prototype.getBack = function () {
                    return this.arr[this.arr.length - 1]
                },
                t.prototype.clear = function () {
                    this.arr = []
                },
                t.prototype.size = function () {
                    return this.arr.length
                },
                t.prototype.deleteBack = function () {
                    this.arr.splice(this.arr.length - 1, 1)
                },
                t.prototype.addFront = function (t) {
                    this.arr.unshift(t)
                },
                t.prototype.getByIndex = function (t) {
                    return this.arr[t]
                },
                t
        }();
        t.Queue = G,
            t.Deg2Rad = function () {
                return 2 * Math.PI / 360
            },
            t.Rad2Deg = function () {
                return 360 / (2 * Math.PI)
            },
            t.getTimeDifference = function (t) {
                return u.BaseStorage.getInt(t, 0) - new Date().getTime()
            },
            t.GetPointAngle = function (t, e) {
                var o = e.x - t.x,
                    i = e.y - t.y;
                return cc.v2(o, i).signAngle(cc.v2(1, 0))
            },
            t.GetRandomNumberArray = function (t, e, o, i) {
                for (var n = [], a = [], r = t; r <= e; r += i) a.push(r);
                var s = 0,
                    l = d = a.length,
                    c = 0;
                for (r = 0; r < o; r++) {
                    var d = Math.random() * l;
                    s = parseInt(d.toString()),
                        n.push(a[s]),
                        s != l - 1 && (c = a[s], a[s] = a[l - 1], a[l - 1] = c),
                        l--
                }
                return n
            };
        var D = function () {
            function t() {
                this.nodeList = []
            }
            return t.prototype.sendMessage = function (t) {
                for (var e = [], o = 1; o < arguments.length; o++) e[o - 1] = arguments[o];
                for (var i = 0; i < this.nodeList.length; i++) {
                    var n = this.nodeList[i];
                    n[t] && n[t].apply(n, e)
                }
            },
                t.prototype.remove = function (t) {
                    for (var e = 0; e < this.nodeList.length; e++) if (this.nodeList[e] === t) {
                        this.nodeList.splice(e, 1);
                        break
                    }
                },
                t.prototype.register = function (t) {
                    this.nodeList.push(t)
                },
                t
        }();
        function O(t, e) {
            return void 0 === e && (e = 1e4),
                new Promise(function (o) {
                    var i = new XMLHttpRequest,
                        n = !1,
                        a = setTimeout(function () {
                            n = !0,
                                this.httpCount--,
                                i.abort(),
                                o(null)
                        },
                            e);
                    i.onreadystatechange = function () {
                        if (4 === i.readyState) {
                            if (n) return;
                            clearTimeout(a),
                                (200 === i.status || 304 === i.status) && i.responseText.length > 0 ? o(i.responseText) : o(null)
                        }
                    },
                        i.open("GET", t, !0),
                        i.send(null)
                })
        }
        function R() {
            return "undefined" != typeof wx && "undefined" == typeof tt
        }
        function P() {
            return d.ChannelTool.curentChannel == d.ChannelTool.ChannelEnum.BYTE && "undefined" != typeof tt
        }
        function U() {
            return d.ChannelTool.curentChannel == d.ChannelTool.ChannelEnum.OPPO && "undefined" != typeof qg
        }
        function x() {
            return d.ChannelTool.curentChannel == d.ChannelTool.ChannelEnum.VIVO && "undefined" != typeof qg
        }
        function N() {
            switch (d.ChannelTool.curentChannel) {
                case d.ChannelTool.ChannelEnum.WE_CHAT:
                    R() && h.default.getIntance().hide_banner();
                    break;
                case d.ChannelTool.ChannelEnum.OPPO:
                    U() && (y.default.instance.hideBanner(), y.default.instance.hideNativeHallBanner());
                    break;
                case d.ChannelTool.ChannelEnum.VIVO:
                    x() && g.default.instance.hideBanner();
                    break;
                case d.ChannelTool.ChannelEnum.BYTE:
                    P() && b.default.instance.hideBanner();
                    break;
                case d.ChannelTool.ChannelEnum.HW:
                    T.default.Ins.hide_banner();
            }
        }
        function k() {
            switch (d.ChannelTool.curentChannel) {
                case d.ChannelTool.ChannelEnum.WE_CHAT:
                    R();
                    break;
                case d.ChannelTool.ChannelEnum.OPPO:
                    U() && y.default.instance.hideNativeHallBanner();
                    break;
                case d.ChannelTool.ChannelEnum.VIVO:
                    x() && g.default.instance.hideNativeHallBanner();
                    break;
                case d.ChannelTool.ChannelEnum.BYTE:
                    P() && b.default.instance.hideHallBanner();
            }
        }
        function L() {
            var t = new Date,
                e = t.getMonth() + 1,
                o = e < 10 ? "0" + e : "" + e,
                i = t.getDate(),
                n = i < 10 ? "0" + i : "" + i;
            return Number(t.getFullYear() + o + n)
        }
        function M(t, e) {
            var o = 1;
            return t >= 1 && (o *= 2),
                t >= 2 && (o *= 1.5),
                t >= 3 && (o *= 1.25),
                t >= 4 && (o *= 1.2),
                t >= 5 && (o *= 1.1 * Math.pow(1.1, t - 5)),
                Math.ceil(e * o)
        }
        function V(t, e) {
            if (e == t) return t;
            if (e < t) return 0;
            var o = Math.random() * (e - t) + t;
            return Math.floor(o)
        }
        function W(e) {
            var o = 0,
                i = 0;
            if (e instanceof Array) for (var n = 0; n < e.length; n++) {
                var a = e[n];
                a instanceof Object && (a.type == p.Basics_Items_Type.weapon ? a.damage && (o += t.transformDamageNum(a.damage, a.level)) : a.hp && (i += t.transformHpNum(a.hp, a.level)))
            } else e instanceof Object && (e.type == p.Basics_Items_Type.weapon ? e.damage && (o += t.transformDamageNum(e.damage, e.level)) : e.hp && (i += t.transformHpNum(e.hp, e.level)));
            return Math.floor(170 * o + 155 * i)
        }
        function E(t, e, o) {
            for (var i = [], n = null, a = 0; a < t.length; a++) switch (e) {
                case c.ComparisonType.Type:
                    n = c.ComparisonType.Id,
                        t[a].type == o.type && i.push(t[a]);
                    break;
                case c.ComparisonType.Id:
                    n = c.ComparisonType.Quality,
                        t[a].id == o.id && i.push(t[a]);
                    break;
                case c.ComparisonType.Quality:
                    n = c.ComparisonType.Star,
                        t[a].quality == o.quality && i.push(t[a]);
                    break;
                case c.ComparisonType.Star:
                    if (t[a].star == o.star) return !0;
            }
            return 0 != i.length && E(i, n, o)
        }
        function H() {
            for (var t = [], e = 0, o = p.Basics_Body_Info; e < o.length; e++) {
                var i = o[e];
                t.push(i)
            }
            for (var n = 0,
                a = p.Basics_Tools_Info; n < a.length; n++) i = a[n],
                    t.push(i);
            for (var r = 0,
                s = p.Basics_Weapon_Info; r < s.length; r++) i = s[r],
                    t.push(i);
            for (var l = 0,
                c = p.Basics_Wheel_Info; l < c.length; l++) i = c[l],
                    t.push(i);
            return t
        }
        function j() {
            return a.default.arrOwnBody.concat(a.default.arrOwnWeapon, a.default.arrOwnWheel, a.default.arrOwnTools)
        }
        function F(t, e) {
            if (e) return e;
            var o = [];
            switch (t) {
                case m.Box_Type.common:
                    o = [.65, .3, .05, 0, 0];
                    break;
                case m.Box_Type.middle:
                    o = [.3, .45, .2, .05, 0];
                    break;
                case m.Box_Type.senior:
                    o = [0, 0, .7, .2, .1];
            }
            for (var i = 0; i < o.length; i++) {
                for (var n = 0,
                    a = 0; a <= i; a++) n += o[a];
                if (Math.random() < n) return i + 1
            }
        }
        function q(t) {
            K(t, a.default.superChariotData.arrBody, p.Basics_Items_Type.body),
                K(t, a.default.superChariotData.arrWheel, p.Basics_Items_Type.wheel),
                K(t, a.default.superChariotData.arrWeapon, p.Basics_Items_Type.weapon),
                K(t, a.default.superChariotData.arrTools, p.Basics_Items_Type.tools)
        }
        function K(t, e, o) {
            var i;
            switch (o) {
                case p.Basics_Items_Type.body:
                    i = a.default.arrOwnBody;
                    break;
                case p.Basics_Items_Type.weapon:
                    i = a.default.arrOwnWeapon;
                    break;
                case p.Basics_Items_Type.wheel:
                    i = a.default.arrOwnWheel;
                    break;
                case p.Basics_Items_Type.tools:
                    i = a.default.arrOwnTools;
            }
            if (t) {
                if (e instanceof Array) for (var n = 0; n < e.length; n++) i.push(e[n]);
                else i.push(e);
            } else if (e instanceof Array) {
                for (n = 0; n < e.length; n++) for (var r = 0; r < i.length; r++) if (i[r].uid == e[n].uid) {
                    i.splice(r, 1);
                    break
                }
            } else for (r = 0; r < i.length; r++) if (i[r].uid == e.uid) {
                i.splice(r, 1);
                break
            }
        }
        function X(e) {
            for (var o = t.getBodyData(a.default.curEquipBody[e]), i = 0; i < a.default.curEquipWheel[e].length; i++) z(t.getWheelData(a.default.curEquipWheel[e][i]), o);
            for (i = 0; i < a.default.curEquipWeapon[e].length; i++) z(t.getWheelData(a.default.curEquipWeapon[e][i]), o);
            for (i = 0; i < a.default.curEquipTools[e].length; i++) z(t.getWheelData(a.default.curEquipTools[e][i]), o)
        }
        function z(t, e) {
            null != t && null != e.buff && null != e.buff.id && t.id == e.buff.id && (cc.log("可以buff加成"), e.buff.buffType == c.BuffType.damage ? t.damage = Math.ceil(t.damage * e.buff.number) : t.hp = Math.ceil(t.hp * e.buff.number))
        }
        function J(t) {
            return a.default.majiaSwitchInfo.find(function (e) {
                return e.switchCode == t
            })
        }
        function Z(e, o, i, n, a, r) {
            void 0 === n && (n = c.Quality.common),
                void 0 === a && (a = {
                    type: null,
                    id: null,
                    buffType: c.BuffType.hp,
                    number: 0
                }),
                void 0 === r && (r = 1);
            var s = null;
            switch (i) {
                case p.Basics_Items_Type.body:
                    s = p.getBodyData(e);
                    break;
                case p.Basics_Items_Type.wheel:
                    s = p.getWheelData(e);
                    break;
                case p.Basics_Items_Type.weapon:
                    s = p.getWeaponData(e);
                    break;
                case p.Basics_Items_Type.tools:
                    s = p.getToolsData(e);
            }
            return t.getItemData(s.id, s.type, o, p.GetRandomItemHp(s, o), p.GetRandomItemDamage(s, o), p.GetRandomItemElec(s, o), n, a, r)
        }
        function Q() {
            return i(this, void 0, void 0,
                function () {
                    var t, e;
                    return n(this,
                        function (o) {
                            switch (o.label) {
                                case 0:
                                    return (t = cc.sys.localStorage.getItem("curCity")) && "CHINA" != t ? (console.log("curCity: " + t), a.default.curCity = t, [3, 3]) : [3, 1];
                                case 1:
                                    return [4, O("https://pv.sohu.com/cityjson?ie=utf-8")];
                                case 2:
                                    (e = o.sent()) && (a.default.curCity = e.replace(/[\s\S]*"cname": "/, "").replace(/"};/, ""), cc.log(a.default.curCity), cc.sys.localStorage.setItem("curCity", JSON.stringify(a.default.curCity))),
                                        o.label = 3;
                                case 3:
                                    return [2];
                            }
                        })
                })
        }
        function Y(t) {
            return i(this, void 0, void 0,
                function () {
                    var e, o;
                    return n(this,
                        function (i) {
                            switch (i.label) {
                                case 0:
                                    return cc.resources.get(t) ? [2, cc.instantiate(cc.resources.get(t))] : [3, 1];
                                case 1:
                                    return o = (e = cc).instantiate,
                                        [4, $(t)];
                                case 2:
                                    return [2, o.apply(e, [i.sent()])];
                            }
                        })
                })
        }
        function $(t) {
            return new Promise(function (e) {
                cc.resources.load(t, cc.Prefab,
                    function () {
                        e(cc.resources.get(t))
                    })
            })
        }
        t.event_dispatcher = new D,
            t.PrefixInteger = function (t, e) {
                return (Array(e).join("0") + t).slice(- e)
            },
            t.compareLevelData = function (t, e) {
                for (var o = t.split("-"), i = e.split("-"), n = Math.max(o.length, i.length); o.length < n;) o.push("0");
                for (; i.length < n;) i.push("0");
                for (var a = 0; a < n; a++) {
                    var r = parseInt(o[a]),
                        s = parseInt(i[a]);
                    if (r > s) return 1;
                    if (r < s) return - 1
                }
                return 0
            },
            t.http_get = O,
            t.timeSpan = function (t, e) {
                if (!u.BaseStorage.getInt(t, 0)) {
                    var o = new Date().getTime() + C.default.convert_hours_to_milliseconds(e);
                    u.BaseStorage.setInt(t, o)
                }
                return cc.log("timeSpan:" + (u.BaseStorage.getInt(t, 0) - new Date().getTime())),
                    u.BaseStorage.getInt(t, 0)
            },
            t.http_get_ex = function (t, e, o) {
                void 0 === o && (o = 1e4);
                var i = new XMLHttpRequest,
                    n = !1,
                    a = setTimeout(function () {
                        n = !0,
                            this.httpCount--,
                            i.abort(),
                            "function" == typeof e.fail && e.fail(i.responseText)
                    },
                        o);
                i.onreadystatechange = function () {
                    if (4 === i.readyState) {
                        if (n) return;
                        clearTimeout(a),
                            (200 === i.status || 304 === i.status) && i.responseText.length > 0 ? "function" == typeof e.succ && e.succ(i.responseText) : "function" == typeof e.fail && e.fail(i.responseText)
                    }
                },
                    i.open("GET", t, !0),
                    i.send(null)
            },
            t.compareVersion = function (t, e) {
                for (var o = t.split("."), i = e.split("."), n = Math.max(o.length, i.length); o.length < n;) o.push("0");
                for (; i.length < n;) i.push("0");
                for (var a = 0; a < n; a++) {
                    var r = parseInt(o[a]),
                        s = parseInt(i[a]);
                    if (r > s) return 1;
                    if (r < s) return - 1
                }
                return 0
            },
            t.sort = function (t) {
                for (var e, o = 0; o < t.length - 1; o++) for (var i = o + 1; i < t.length; i++) t[i] < t[o] && (e = t[o], t[o] = t[i], t[i] = e)
            },
            t.isGameEnd = !1,
            t.isDeveloperModel = !1,
            t.cameraModel = !1,
            t.demoTest = !1,
            t.initChannel = function () {
                switch (cc.log("初始化 渠道"), d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().initConfig();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                        break;
                    case d.ChannelTool.ChannelEnum.BYTE:
                        P() && b.default.instance.init();
                        break;
                    case d.ChannelTool.ChannelEnum.HW:
                        T.default.Ins.init();
                }
            },
            t.is_wx = R,
            t.is_tt = P,
            t.is_OPPO = U,
            t.is_VIVO = x,
            t.is_233 = function () {
                return A() && w.default.instance.is233
            },
            t.is_HW = function () {
                return d.ChannelTool.curentChannel == d.ChannelTool.ChannelEnum.HW && "undefined" != typeof qg
            },
            t.is_qg = function () {
                return "undefined" != typeof qg
            },
            t.getSystemInfo = function () {
                return "undefined" != wx ? wx.getSystemInfoSync() : void 0
            },
            t.wxReportUseBehavior = function (t, e, o, i) {
                R() && h.default.getIntance().reportUseBehavior(t, e, o, i)
            },
            t.wxAldGameReport = function (t, e) {
                if (R()) switch (e) {
                    case "game_start":
                        h.default.getIntance().aladin_start(t);
                        break;
                    case "game_win":
                        h.default.getIntance().aladin_win(t);
                        break;
                    case "game_fail":
                        h.default.getIntance().aladin_fail(t);
                }
            },
            t.initCommonAds = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && (h.default.getIntance().init_rewardVideo(), h.default.getIntance().init_banner(), Q());
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.init();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.init();
                        break;
                    case d.ChannelTool.ChannelEnum.HW:
                }
            },
            t.init_majia_banner = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().refresh_majia_banner();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.showMajiaCustomAd = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().showMajiaCustomAd();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.hideMajiaCustomAd = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().hideMajiaCustomAd();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.initNativeAds = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && (h.default.getIntance().init_customAd_horizontal_full_screen(), h.default.getIntance().init_horizontalAd());
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.shareAppMessage = function (t) {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().shareAppMsg(a.default.shareInfo, t);
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                        break;
                    case d.ChannelTool.ChannelEnum.BYTE:
                        P() && b.default.instance.shareAppMsg();
                }
            },
            t.exitApplication = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.exitApplication();
                        break;
                    case d.ChannelTool.ChannelEnum.HW:
                        T.default.Ins.exitApplication();
                        break;
                    case d.ChannelTool.ChannelEnum.ANDROID:
                        w.default.instance.exitApplication();
                }
                t.isAndroid() && w.default.instance.exitApplication()
            },
            t.newBanner = function () {
                if (cc.sys.platform === cc.sys.VIVO_GAME || cc.sys.platform === cc.sys.OPPO_GAME) g.default.instance.showBanner();
            },
            t.showBanner = function (e, o) {
                g.default.instance.newNative();
                // if (void 0 === o && (o = !1), !a.default.isTest) switch (d.ChannelTool.curentChannel) {
                //     case d.ChannelTool.ChannelEnum.WE_CHAT:
                //         if (R()) {
                //             if (!a.default.bShowAd || !a.default.bShowBannerAd) return;
                //             h.default.getIntance().show_banner(e, o)
                //         }
                //         break;
                //     case d.ChannelTool.ChannelEnum.OPPO:
                //         U() && (t.hideHallBanner(), y.default.instance.showBanner());
                //         break;
                //     case d.ChannelTool.ChannelEnum.VIVO:
                //         x() && (k(), g.default.instance.showBanner());
                //         break;
                //     case d.ChannelTool.ChannelEnum.BYTE:
                //         P() && b.default.instance.showBanner(e);
                //         break;
                //     case d.ChannelTool.ChannelEnum.HW:
                //         T.default.Ins.show_banner(e, o);
                // }
            },
            t.hideBanner = N,
            t.showMistakeTouchBanner = function (t, e) {
                if (void 0 === e && (e = !1), console.log("误触bannerTouchSW：" + a.default.operationData.bannerTouchSW + ":" + a.default.operationData.sceneIds), !a.default.operationData.bannerTouchSW || a.default.operationData.sceneIds.indexOf(a.default.curSceneId) <= -1 || a.default.isTest) return console.log("误触bannerTouchSW：不支持"),
                    void (t.error && t.error.call(t.caller));
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().showMistakeTouchBanner(t, e);
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && t.error && t.error.call(t.caller);
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && t.error && t.error.call(t.caller);
                }
            },
            t.hideMistakeTouchBanner = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().hideMistakeTouchBanner();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.showMistakeBanner = function (t, e, o) {
                if (!a.default.isTest && !a.default.bAuditMode) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().showMistakeBanner(t, e, o);
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.hideMistakeBanner = function () {
                if (!a.default.bAuditMode) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().hideMistakeBanner();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.showNativeBanner = function (t, e, o) {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && (N(), y.default.instance.showNativeBanner(t, e, o));
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && (N(), g.default.instance.showNativeBanner(t, e, o));
                }
            },
            t.clickNativeBanner = function (t) {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.clickNativeBanner(t);
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.clickNativeBanner(t);
                }
            },
            t.hideNativeBanner = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.hideNativeBanner();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.hideNativeBanner();
                }
            },
            t.showHallBanner = function () {
                if (!a.default.isTest && !a.default.isMatchView && !a.default.isSignView) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.showNativeHallBanner(null);
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && (N(), g.default.instance.showNativeHallBanner(null));
                        break;
                    case d.ChannelTool.ChannelEnum.BYTE:
                        P() && (N(), b.default.instance.showHallBanner());
                }
            },
            t.hideHallBanner = k,
            t.clickHallBanner = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.clickNativeHallBanner();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.clickNativeHallBanner();
                }
            },
            t.hasHallNativeBanner = function () {
                return U() ? !!y.default.instance.nativeHallBannerObj.nativeAdItem : !!x() && !!g.default.instance.nativeHallBannerObj.nativeAdItem
            },
            t.showNaiveInsertAd = function () {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.showNativeInsertAd();
                }
            },
            t.showBoxNativeInsertAd = function () {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.showBoxNativeInsertAd();
                }
            },
            t.hideBoxNativeInsertAd = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.hideBoxNaiveInsertAd();
                }
            },
            t.showNativeMatchBanner = function () {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && (k(), g.default.instance.showNativeMatchBanner());
                }
            },
            t.hideNativeMatchBanner = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.hideNativeMatchBanner();
                }
            },
            t.getCurbannerIndex = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        if (R()) return h.default.getIntance().bannerId;
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        if (U()) return 0;
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        if (x()) return 0;
                        break;
                    default:
                        return 0;
                }
            },
            t.refreshBanner = function (t) {
                if (!a.default.isTest && a.default.bShowAd && a.default.bShowBannerAd) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().refreshBanner(t);
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                        break;
                    case d.ChannelTool.ChannelEnum.HW:
                        T.default.Ins.refreshBanner(t);
                }
            },
            t.showInterstitialAd = function (e, o, i) {
                if (!a.default.isTest) if (!t.is_wx() || a.default.bShowAd && a.default.bShowInsertAd) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().show_insertAd(e, o, i);
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.showInsertAd(o);
                        break;
                    case d.ChannelTool.ChannelEnum.BYTE:
                        P() && b.default.instance.showInsertAd(e, o);
                        break;
                    case d.ChannelTool.ChannelEnum.HW:
                        T.default.Ins.showInsertAd(e, o, i);
                        break;
                    case d.ChannelTool.ChannelEnum.ANDROID:
                        w.default.instance.showInterstitialAd();
                } else e && e()
            },
            t.show_VerticalCustomAd = function (t, e, o, i) {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().show_VerticalCustomAd(t, e, o, i);
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                        break;
                    case d.ChannelTool.ChannelEnum.BYTE:
                        P();
                }
            },
            t.hide_VerticalCustomAd = function (t, e) {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().hide_VerticalCustomAd(t, e);
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                        break;
                    case d.ChannelTool.ChannelEnum.BYTE:
                        P();
                }
            },
            t.showSingleCustomAd = function (t, e, o) {
                if (!a.default.isTest) if (a.default.bShowAd && a.default.bShowNativeAd) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().showSingleCustomAd(t, e);
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                } else o && o()
            },
            t.showLeftSingleCustomAd = function () {
                a.default.isTest || R() && h.default.getIntance().showLeftSingleCustomAd()
            },
            t.hideLeftSingleCustomAd = function () {
                R() && h.default.getIntance().hideLeftSingleCustomAd()
            },
            t.showRightSingleCustomAd = function () {
                a.default.isTest || R() && h.default.getIntance().showRightSingleCustomAd()
            },
            t.hideRightSingleCustomAd = function () {
                R() && h.default.getIntance().hideRightSingleCustomAd()
            },
            t.showEndUISingleCustomAd = function () {
                a.default.isTest || R() && h.default.getIntance().showEndUISingleCustomAd()
            },
            t.hideEndUISingleCustomAd = function () {
                R() && h.default.getIntance().hideEndUISingleCustomAd()
            },
            t.showGameBannerAd = function () {
                a.default.isTest || U() && y.default.instance.showGameBannerAd()
            },
            t.hideGameBannerAd = function () {
                U() && y.default.instance.hideGameBannerAd()
            },
            t.showGamePortalAd = function (t) {
                a.default.isTest || d.ChannelTool.curentChannel == d.ChannelTool.ChannelEnum.OPPO && U() && y.default.instance.showGamePortalAd(t)
            },
            t.installShortCut = function (t, e) {
                return i(this, void 0, void 0,
                    function () {
                        return n(this,
                            function (o) {
                                switch (o.label) {
                                    case 0:
                                        switch (d.ChannelTool.curentChannel) {
                                            case d.ChannelTool.ChannelEnum.WE_CHAT:
                                                return [3, 1];
                                            case d.ChannelTool.ChannelEnum.OPPO:
                                                return [3, 2];
                                            case d.ChannelTool.ChannelEnum.VIVO:
                                                return [3, 5];
                                        }
                                        return [3, 6];
                                    case 1:
                                        return R(),
                                            [3, 7];
                                    case 2:
                                        return U() ? [4, y.default.instance.hasShortcutInstalled()] : [3, 4];
                                    case 3:
                                        o.sent() || y.default.instance.installShortCut(t),
                                            o.label = 4;
                                    case 4:
                                        return [3, 7];
                                    case 5:
                                        return x() && g.default.instance.installShortCut(t, e),
                                            [3, 7];
                                    case 6:
                                        return [3, 7];
                                    case 7:
                                        return [2];
                                }
                            })
                    })
            },
            t.hasInstallShortCut = function () {
                return i(this, void 0, void 0,
                    function () {
                        return n(this,
                            function (t) {
                                switch (t.label) {
                                    case 0:
                                        switch (d.ChannelTool.curentChannel) {
                                            case d.ChannelTool.ChannelEnum.WE_CHAT:
                                                return [3, 1];
                                            case d.ChannelTool.ChannelEnum.OPPO:
                                                return [3, 2];
                                            case d.ChannelTool.ChannelEnum.VIVO:
                                                return [3, 5];
                                        }
                                        return [3, 8];
                                    case 1:
                                        return R() ? [2, !0] : [3, 9];
                                    case 2:
                                        return U() ? [4, y.default.instance.hasShortcutInstalled()] : [3, 4];
                                    case 3:
                                        return [2, t.sent()];
                                    case 4:
                                        return [3, 9];
                                    case 5:
                                        return x() ? [4, g.default.instance.hasShortcutInstalled()] : [3, 7];
                                    case 6:
                                        return [2, t.sent()];
                                    case 7:
                                    case 8:
                                        return [3, 9];
                                    case 9:
                                        return [2, !0];
                                }
                            })
                    })
            },
            t.showGameNativeAd = function () { },
            t.showNativeGridAd = function (t, e) {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.showNativeGrid(t);
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.showNativeGrid(t, e);
                }
            },
            t.hideNativeGridAd = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.hideNativeGrid();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.hideNativeGrid();
                }
            },
            t.hasNativeGridAd = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        if (R()) return !1;
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        if (U()) return !1;
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        if (x()) return g.default.instance.hasNativeGrid();
                        break;
                    default:
                        return !1;
                }
            },
            t.clickNativeGridAd = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.clickNativeGrid();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.clickNativeGrid();
                }
            },
            t.showNativeOverView = function (t, e, o) {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.showNativeOverView(null);
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.showNativeOverView(null, t, e, o);
                }
            },
            t.showNativeSupply = function (t, e, o) {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.showNativeSupply(t, e, o);
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.showNativeSupply(t, e, o);
                }
            },
            t.clickNativeSupply = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && y.default.instance.clickNativeSupply();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && g.default.instance.clickNativeSupply();
                }
            },
            t.scaleRectWdith = function (t, e) {
                for (; t.width > e;) {
                    console.log("scaleRectWdith:" + t.width);
                    var o = t.width / t.height;
                    t.width = e,
                        t.height = e / o
                }
            },
            t.attackSpeed = function (t, e) {
                return e == f.Collide_Car_Tag.Left && a.default.propType == c.Props.AttackSpeed ? .5 * t : t
            },
            t.hideSingleCustomAd = function () {
                if (a.default.bShowAd && a.default.bShowNativeAd) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().hideSingleCustomAd();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.showGridAd = function (t) {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().show_gridAd(t);
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.show_matrixAd = function (t) {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().showMatrixCustomAd(t);
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.hide_matrixAd = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().hideMatrixCustomAd();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.show_horizontalAd = function () {
                if (!a.default.isTest) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().show_horizontalAd();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.hide_horizontalAd = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().hide_horizontalAd();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.hideGridAd = function () {
                switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && h.default.getIntance().hide_gridAd();
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U();
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x();
                }
            },
            t.videoExposure = function (e) {
                a.default.videoTab = e,
                    e != c.VideoTab.Unknown && t.wxReportUseBehavior(c.SceneName.Ads, c.BranchId.VideoAd, 1, a.default.videoTab.toString())
            },
            t.delayToShow = function (t) {
                a.default.bAuditMode ? t.active = !0 : (t.active = !1, cc.tween(t).delay(3).call(function () {
                    t.active = !0
                }).start())
            },
            t.showRewardVideo = function (e, o, i, n) {
                if (void 0 === n && (n = !0), a.default.isTest) e && e();
                else {
                    R();
                    var r = a.default.videoTab.toString();
                    t.wxReportUseBehavior(c.SceneName.Ads, c.BranchId.VideoAd, 2, r),
                        t.setGameSpeed(0);
                    var s = function () {
                        t.setGameSpeed(1),
                            t.getDailyVidoNum(!0),
                            e && e()
                    },
                        p = function () {
                            t.setGameSpeed(1),
                                o && o()
                        },
                        u = function () {
                            t.setGameSpeed(1),
                                l.default.show("视频拉取失败"),
                                i && i()
                        };
                    switch (d.ChannelTool.curentChannel) {
                        case d.ChannelTool.ChannelEnum.WE_CHAT:
                            R() ? h.default.getIntance().show_rewardVideo(s, p, u, n) : s();
                            break;
                        case d.ChannelTool.ChannelEnum.OPPO:
                            U() ? y.default.instance.showRewardVideoAd(s, p, u) : s();
                            break;
                        case d.ChannelTool.ChannelEnum.VIVO:
                            x() ? g.default.instance.showRewardVideoAd(s, p, u) : s();
                            break;
                        case d.ChannelTool.ChannelEnum.BYTE:
                            P() ? b.default.instance.showRewardVideo(s, p, u) : s();
                            break;
                        case d.ChannelTool.ChannelEnum.HW:
                            T.default.Ins.showVideoAd(s, p, u);
                            break;
                        case d.ChannelTool.ChannelEnum.ANDROID:
                            w.default.instance.showVideoAd(s, p, u);
                            break;
                        default: l.default.show("视频加载失败");
                    }
                }
            },
            t.getDailyVidoNum = function (t) {
                var e = 0,
                    o = 0,
                    i = cc.sys.localStorage.getItem("user_dailyvideo_data");
                if (i) {
                    var n = JSON.parse(i);
                    e = Number(n.total),
                        o = Number(n.date)
                }
                var a = L();
                a != o && (e = 0),
                    t && e++;
                var r = {
                    total: e,
                    date: a
                };
                return cc.sys.localStorage.setItem("user_dailyvideo_data", JSON.stringify(r)),
                    e
            },
            t.vibrateLong = function () {
                if (a.default.isVibrator) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && wx.vibrateLong({});
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && qg.vibrateLong({
                            success: function () { },
                            fail: function () { },
                            complete: function () { }
                        });
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && qg.vibrateLong();
                        break;
                    case d.ChannelTool.ChannelEnum.BYTE:
                        P() && b.default.instance.vibrateLong();
                }
            },
            t.vibrateMiddle = function () {
                var t = this;
                if (a.default.isVibrator) var e = 0,
                    o = setInterval(function () {
                        t.vibrateShort(),
                            ++e > 3 && (clearTimeout(o), o = null)
                    },
                        15)
            },
            t.vibrateShort = function () {
                if (a.default.isVibrator) switch (d.ChannelTool.curentChannel) {
                    case d.ChannelTool.ChannelEnum.WE_CHAT:
                        R() && wx.vibrateShort({});
                        break;
                    case d.ChannelTool.ChannelEnum.OPPO:
                        U() && qg.vibrateShort({
                            success: function () { },
                            fail: function () { },
                            complete: function () { }
                        });
                        break;
                    case d.ChannelTool.ChannelEnum.VIVO:
                        x() && qg.vibrateShort();
                        break;
                    case d.ChannelTool.ChannelEnum.BYTE:
                        P() && b.default.instance.vibrateShort();
                }
            },
            t.setGameSpeed = function (t) {
                t < 0 && (t = 0),
                    0 == t ? (cc.director.getPhysicsManager().enabled = !1, cc.director.getCollisionManager().enabled = !1) : (cc.director.getPhysicsManager().enabled = !0, cc.director.getCollisionManager().enabled = !0),
                    cc.kSpeed(t)
            },
            t.getCurDayDate = L,
            t.AnimFly = function (e, o, i, n, a, s) {
                for (var l = t.getRandomInt(20, 25), c = 0; c < l; c++) {
                    var d = cc.instantiate(o);
                    i.addChild(d),
                        d.getComponent(r.default).playAnim(c, l, n,
                            function () {
                                a && a()
                            },
                            function () {
                                s && s()
                            },
                            e)
                }
            },
            t.AnimNumJump = function (t, e, o, i, n, a) {
                if (a) {
                    a.stopAllActions();
                    var r = cc.tween().to(.1, {
                        y: 20
                    },
                        {
                            easing: "sineIn"
                        }),
                        s = cc.tween().to(.1, {
                            y: -10
                        },
                            {
                                easing: "sineOut"
                            }),
                        l = cc.tween().sequence(s, r);
                    cc.tween(a).repeatForever(l).start()
                }
                var c = Math.ceil((o - e) / 10),
                    d = function () {
                        if ((e += c) >= o) return a && (a.y = 0, a.stopAllActions()),
                            n && n(),
                            void t.stopAllActions();
                        i && i(e),
                            cc.tween(t).delay(.2).call(function () {
                                d()
                            }).start()
                    };
                d()
            },
            t.transformGoldStr = function (t) {
                return t <= 0 ? "0" : t < 1e4 ? t.toString() : t < 1e7 ? (e = t / 1e3).toString().length > 4 ? e.toPrecision(4) + "k" : e + "k" : (e = t / 1e7).toPrecision(4) + "m";
                var e
            }, t.transformHpNum = function (t, e) {
                if (t <= 0) return 0;
                if ((e = e || 1) > 60) {
                    var o = Math.pow(1.1, 59);
                    return Math.ceil(t * o)
                }
                return M(e - 1, t)
            },
            t.transformDamageNum = function (t, e) {
                if (t <= 0) return 0;
                if ((e = e || 1) > 60) {
                    var o = Math.pow(1.1, 59);
                    return Math.ceil(t * o)
                }
                return M(e - 1, t)
            },
            t.transformSellGold = function (t) {
                t = t || 1;
                var e = 1.5 * Math.pow(t, 2);
                return Math.ceil(e + 20)
            },
            t.get_num_processed = function (t) {
                var e = t.toFixed(0);
                return (t = parseInt(e)) >= 1e4 && t < 1e6 ? t % 1e3 > 0 ? (t /= 1e3).toFixed(1) + "K" : (t /= 1e3) + "K" : t >= 1e6 ? t % 1e6 > 0 ? (t /= 1e6).toFixed(1) + "M" : (t /= 1e6) + "M" : t.toString()
            },
            t.getRandomInt = V,
            t.getRandomFloat = function (t, e) {
                return e == t ? t : e < t ? 0 : Math.random() * (e - t) + t
            },
            t.probability = function (t) {
                if (t <= 0) return !1;
                t = 100 * t || 1;
                var e = Math.floor(100 * Math.random());
                return 1 === t || e < t
            },
            t.getItemData = function (t, e, o, i, n, r, s, l, d) {
                return void 0 === s && (s = c.Quality.common),
                    void 0 === l && (l = {
                        type: null,
                        id: null,
                        buffType: c.BuffType.hp,
                        number: 0
                    }),
                    void 0 === d && (d = 1),
                {
                    uid: a.default.getCarItemsUid(),
                    id: t,
                    type: e,
                    star: o,
                    hp: i,
                    quality: s,
                    buff: l,
                    damage: n,
                    elec: r,
                    level: d
                }
            },
            t.getVideoItemData = function (t, e, o, i, n, r, s, l, d) {
                return void 0 === s && (s = c.Quality.common),
                    void 0 === l && (l = {
                        type: null,
                        id: null,
                        buffType: c.BuffType.hp,
                        number: 0
                    }),
                    void 0 === d && (d = 1),
                {
                    uid: a.default.getCarItemsUid(),
                    id: t,
                    type: e,
                    star: o,
                    hp: i,
                    quality: s,
                    buff: l,
                    damage: n,
                    elec: r,
                    level: d,
                    video: !0
                }
            },
            t.setBodyParts = function (t, e) {
                var o = cc.instantiate(e);
                return o.parent = t,
                    o
            },
            t.getBodyData = function (t) {
                for (var e = 0; e < a.default.arrOwnBody.length; e++) if (a.default.arrOwnBody[e].uid == t) return a.default.arrOwnBody[e];
                return null
            },
            t.getBodyId = function (t) {
                for (var e = 0; e < a.default.arrOwnBody.length; e++) if (a.default.arrOwnBody[e].uid == t) return a.default.arrOwnBody[e].id;
                return null
            },
            t.getWheelData = function (t) {
                for (var e = 0; e < a.default.arrOwnWheel.length; e++) if (a.default.arrOwnWheel[e].uid == t) return a.default.arrOwnWheel[e];
                return null
            },
            t.getWeaponData = function (t) {
                for (var e = 0; e < a.default.arrOwnWeapon.length; e++) if (a.default.arrOwnWeapon[e].uid == t) return a.default.arrOwnWeapon[e];
                return null
            },
            t.getToolsData = function (t) {
                for (var e = 0; e < a.default.arrOwnTools.length; e++) if (a.default.arrOwnTools[e].uid == t) return a.default.arrOwnTools[e];
                return null
            },
            t.getOwnItemPower = W,
            t.comparison = function (t) {
                return E(a.default.arrItemRecord, c.ComparisonType.Type, t)
            },
            t.isSame = E,
            t.getOwnAllItemPower = function () {
                for (var t = 0,
                    e = 0; e < a.default.arrOwnBody.length; e++) t += W(a.default.arrOwnBody[e]);
                for (e = 0; e < a.default.arrOwnWheel.length; e++) t += W(a.default.arrOwnWheel[e]);
                for (e = 0; e < a.default.arrOwnWeapon.length; e++) t += W(a.default.arrOwnWeapon[e]);
                for (e = 0; e < a.default.arrOwnTools.length; e++) t += W(a.default.arrOwnTools[e]);
                return t
            },
            t.getCurItemPower = function (t) {
                for (var e = 0,
                    o = 0; o < t.body.length; o++) e += W(t.body[o]);
                for (o = 0; o < t.wheel.length; o++) e += W(t.wheel[o]);
                for (o = 0; o < t.weapon.length; o++) e += W(t.weapon[o]);
                for (o = 0; o < t.tools.length; o++) e += W(t.tools[o]);
                return e
            },
            t.getCurItemData = function (e, o, i) {
                var n, r = a.default.getCurCarPower(),
                    s = 0,
                    l = 0;
                switch (o) {
                    case p.Basics_Items_Type.body:
                        n = r.body[e];
                        break;
                    case p.Basics_Items_Type.wheel:
                        n = r.wheel[e];
                        break;
                    case p.Basics_Items_Type.weapon:
                    case p.Basics_Items_Type.tools:
                        n = r.weapon[e];
                }
                if (n instanceof Array) {
                    var c = n[0];
                    if (null == c) return 8;
                    c.hp && (s = t.transformHpNum(c.hp, c.level)),
                        c.damage && (l = t.transformDamageNum(c.damage, c.level))
                } else {
                    if (null == n) return 8;
                    n.hp && (s = t.transformHpNum(n.hp, n.level)),
                        n.damage && (l = t.transformDamageNum(n.damage, n.level))
                }
                return i == p.DataType.hp ? s : l
            },
            t.getAssets = function (t, e) {
                return i(this, void 0, Promise,
                    function () {
                        return n(this,
                            function () {
                                return [2, new Promise(function (o) {
                                    var i = t.get(e);
                                    i ? o(i) : t.load(e,
                                        function (t, e) {
                                            t || o(e)
                                        })
                                })]
                            })
                    })
            },
            t.getBundle = function (t) {
                return S.assetBundle.find(function (e) {
                    return e.name == t
                }).bundle
            },
            t.deepCopyJson = function t(e) {
                for (var o = {},
                    i = 0,
                    n = Object.keys(e); i < n.length; i++) {
                    var a = n[i];
                    o[a] = "object" == typeof e[a] ? t(e[a]) : e[a]
                }
                return o
            },
            t.getCarItemData = function (e, o, i) {
                return i || (i = F(e)),
                    t.getItemData(o.id, o.type, i, p.GetRandomItemHp(o, i), p.GetRandomItemDamage(o, i), p.GetRandomItemElec(o, i), o.quality, o.buff)
            },
            t.getRandomCarItem = function (e) {
                var o = H(),
                    i = o[Math.floor(Math.random() * o.length)],
                    n = null;
                switch (i.type) {
                    case p.Basics_Items_Type.body:
                        n = p.getBodyData(i.id);
                        break;
                    case p.Basics_Items_Type.tools:
                        n = p.getToolsData(i.id);
                        break;
                    case p.Basics_Items_Type.weapon:
                        n = p.getWeaponData(i.id);
                        break;
                    case p.Basics_Items_Type.wheel:
                        n = p.getWheelData(i.id);
                }
                return t.getVideoItemData(n.id, n.type, e, p.GetRandomItemHp(n, e), p.GetRandomItemDamage(n, e), p.GetRandomItemElec(n, e), n.quality, n.buff)
            },
            t.getCarBaseData = function (t) {
                for (var e = 0,
                    o = H(); e < o.length; e++) {
                    var i = o[e];
                    if (i.id == t) return i
                }
            },
            t.getAllCarBasicsInfo = H,
            t.getAllItemData = j,
            t.itemHighestLevel = function () {
                for (var t = 0,
                    e = 0; e < j().length; e++) {
                    var o = j()[e];
                    o.level > t && (t = o.level)
                }
                return t
            },
            t.getOneItemStar = F,
            t.getRandomStar = function (t) {
                for (var e = 0,
                    o = Math.random(), i = 0, n = 0; n < t.length; n++) if (o <= (i += t[n])) {
                        e = n + 1;
                        break
                    }
                return e
            },
            t.copyItemData = function (t, e) {
                t.uid = e.uid,
                    t.id = e.id,
                    t.type = e.type,
                    t.star = e.star,
                    t.hp = e.hp,
                    t.quality = e.quality,
                    t.buff = e.buff,
                    t.damage = e.damage,
                    t.elec = e.elec,
                    t.level = e.level,
                    console.log("data1: " + JSON.stringify(t)),
                    console.log("data2: " + JSON.stringify(e))
            },
            t.loadSceneId = function (t) {
                var e = cc.sys.localStorage.getItem("catsScene");
                if (console.log("date: " + new Date().getDate()), e) {
                    var o = JSON.parse(e);
                    console.log("加载场景值：" + t),
                        o.id && (a.default.curSceneId = o.id)
                } else console.log("存储新场景值：" + t),
                    a.default.curSceneId = t,
                    cc.sys.localStorage.setItem("catsScene", JSON.stringify({
                        id: t,
                        date: new Date().getDate()
                    }))
            },
            t.superCarSwapData = function (e, o) {
                if (void 0 === o && (o = 0), e) {
                    if (- 1 != a.default.swapCarIndex) return;
                    a.default.swapCarIndex = o,
                        console.log("试玩"),
                        q(!0),
                        a.default.tempExchangeData.curEquipBody[0] = a.default.curEquipBody[a.default.swapCarIndex],
                        a.default.tempExchangeData.curEquipWheel[0] = a.default.curEquipWheel[a.default.swapCarIndex][0],
                        a.default.tempExchangeData.curEquipWheel[1] = a.default.curEquipWheel[a.default.swapCarIndex][1],
                        a.default.tempExchangeData.curEquipWeapon[0] = a.default.curEquipWeapon[a.default.swapCarIndex][0],
                        a.default.tempExchangeData.curEquipTools[0] = a.default.curEquipTools[a.default.swapCarIndex][0],
                        a.default.curEquipBody[a.default.swapCarIndex] = a.default.superChariotData.arrBody[0].uid,
                        a.default.curEquipWheel[a.default.swapCarIndex][0] = a.default.superChariotData.arrWheel[0].uid,
                        a.default.curEquipWheel[a.default.swapCarIndex][1] = a.default.superChariotData.arrWheel[1].uid,
                        a.default.curEquipWeapon[a.default.swapCarIndex][0] = a.default.superChariotData.arrWeapon[0].uid,
                        a.default.curEquipTools[a.default.swapCarIndex][0] = a.default.superChariotData.arrTools[0].uid,
                        i = a.default.tempExchangeData,
                        n = i.curEquipBody[0] ? t.getBodyData(i.curEquipBody[0]).hp : 1,
                        r = i.curEquipWheel[0] ? t.getWheelData(i.curEquipWheel[0]).hp : 1,
                        s = i.curEquipWheel[1] ? t.getWheelData(i.curEquipWheel[1]).hp : 1,
                        l = i.curEquipWeapon[0] ? t.getWeaponData(i.curEquipWeapon[0]).damage : 1,
                        c = i.curEquipTools[0] ? t.getToolsData(i.curEquipTools[0]).hp : 1,
                        t.getBodyData(a.default.curEquipBody[a.default.swapCarIndex]).hp = 2 * n,
                        t.getWheelData(a.default.curEquipWheel[a.default.swapCarIndex][0]).hp = 2 * r,
                        t.getWheelData(a.default.curEquipWheel[a.default.swapCarIndex][1]).hp = 2 * s,
                        t.getWeaponData(a.default.curEquipWeapon[a.default.swapCarIndex][0]).damage = 2 * l,
                        t.getToolsData(a.default.curEquipTools[a.default.swapCarIndex][0]).hp = 2 * c
                } else {
                    if (- 1 == a.default.swapCarIndex) return;
                    console.log("试玩回复"),
                        q(!1),
                        a.default.curEquipBody[a.default.swapCarIndex] = a.default.tempExchangeData.curEquipBody[0],
                        a.default.curEquipWheel[a.default.swapCarIndex][0] = a.default.tempExchangeData.curEquipWheel[0],
                        a.default.curEquipWheel[a.default.swapCarIndex][1] = a.default.tempExchangeData.curEquipWheel[1],
                        a.default.curEquipWeapon[a.default.swapCarIndex][0] = a.default.tempExchangeData.curEquipWeapon[0],
                        a.default.curEquipTools[a.default.swapCarIndex][0] = a.default.tempExchangeData.curEquipTools[0],
                        a.default.swapCarIndex = -1
                }
                var i, n, r, s, l, c
            }, t.saveTempOwnCarData = K,
            t.initBuff = function () {
                for (var t = 0; t < a.default.nEquipMax; t++) X(t)
            },
            t.setCarBuff = X,
            t.setBuff = z,
            t.getSwitchInfo = J,
            t.isVideorSwitchOn = function (t) {
                return a.default.wx_channel == B.WXChannel.MIAOXING && !(a.default.nGuideStep < s.Guide_Step.trySuperCar) && !(a.default.majiaSwitchInfo.length <= 0) && J(t).switchStatus
            },
            t.bannerInv = -1,
            t.isFreshMajia = function () {
                return t.bannerInv > 0 ? new Date().getTime() - t.bannerInv > 3e4 && (t.bannerInv = new Date().getTime(), !0) : (t.bannerInv = new Date().getTime(), !0)
            },
            t.isBannerSwitchOn = function () {
                if (this.bannerInv > 0 && new Date().getTime() - this.bannerInv < 3e4) return !1;
                if (a.default.wx_channel != B.WXChannel.MIAOXING) return !1;
                if (this.bannerInv > 0 && new Date().getTime() - this.bannerInv < 3e4) return !1;
                if (a.default.nGuideStep < s.Guide_Step.trySuperCar) return !1;
                if (a.default.majiaSwitchInfo.length <= 0) return !1;
                var t = J("open1"),
                    e = J("zjsy"),
                    o = J("ssfx"),
                    i = J("qtyh");
                return !!t.switchStatus && (this.bannerInv = new Date().getTime(), a.default.adList.indexOf(a.default.curSceneId) >= 0 || (a.default.recentlyUsedList.indexOf(a.default.curSceneId) >= 0 ? e.switchStatus : a.default.shareList.indexOf(a.default.curSceneId) >= 0 ? o.switchStatus : i.switchStatus))
            },
            t.LoadSwitchInfo = function () {
                a.default.wx_channel == B.WXChannel.MIAOXING && I.HttpUtil.POST("https://cn.game.77hd.com/", {
                    sign: "",
                    noncestr: "",
                    biz: {
                        appid: "10581002"
                    },
                    actionId: 64e3
                },
                    function (t, e) {
                        var o = JSON.parse(e);
                        o.biz && (a.default.majiaSwitchInfo = o.biz, console.log("加载开关数据结果：" + JSON.stringify(a.default.majiaSwitchInfo)))
                    })
            },
            t.initCustomCar = function (e, o, i, n) {
                var a = i,
                    r = n;
                o.arrBody = [],
                    o.arrWheel = [],
                    o.arrWeapon = [],
                    o.arrTools = [];
                for (var s = e,
                    l = 0; l < s.length; l++) {
                    var d = Z(s[l].bodyId, r, p.Basics_Items_Type.body, c.Quality.epic, {
                        type: p.Basics_Items_Type.weapon,
                        id: s[l].weapon0Id,
                        buffType: c.BuffType.damage,
                        number: 1.5
                    },
                        a),
                        h = Z(s[l].wheel0Id, r, p.Basics_Items_Type.wheel, c.Quality.common, {
                            type: null,
                            id: null,
                            buffType: c.BuffType.hp,
                            number: 0
                        },
                            a),
                        u = Z(s[l].wheel1Id, r, p.Basics_Items_Type.wheel, c.Quality.common, {
                            type: null,
                            id: null,
                            buffType: c.BuffType.hp,
                            number: 0
                        },
                            a),
                        f = Z(s[l].weapon0Id, r, p.Basics_Items_Type.weapon, c.Quality.epic, {
                            type: null,
                            id: null,
                            buffType: c.BuffType.hp,
                            number: 0
                        },
                            a),
                        m = Z(s[l].tool0Id, r, p.Basics_Items_Type.tools, c.Quality.common, {
                            type: null,
                            id: null,
                            buffType: c.BuffType.hp,
                            number: 0
                        },
                            a);
                    t.setBuff(h, d),
                        t.setBuff(u, d),
                        t.setBuff(f, d),
                        t.setBuff(m, d),
                        o.arrBody.push(d),
                        o.arrWheel.push(h),
                        o.arrWheel.push(u),
                        o.arrWeapon.push(f),
                        o.arrTools.push(m)
                }
            },
            t.getCustomItemData = Z,
            t.getWifiCity = Q,
            t.getWxCity = function () {
                wx.getLocation({
                    type: "wgs84",
                    success: function (t) {
                        var e = "https://apis.map.qq.com/ws/geocoder/v1/?location=" + t.latitude + "," + t.longitude + "&key=CCSBZ-HGFKX-BXO4K-ZZHQG-3SFNV-FFBK5";
                        wx.request({
                            url: e,
                            success: function (t) {
                                cc.log(t.data.result.address),
                                    a.default.curCity = t.data.result.address
                            }
                        })
                    }
                })
            },
            t.canShowGiftRush = function () {
                if (console.log("GlobalUserData.curCity: ", a.default.curCity), !a.default.curCity || a.default.curCity.indexOf("CHINA") >= 0) return !1;
                for (var t = 0,
                    e = a.default.block_citys; t < e.length; t++) {
                    var o = e[t];
                    if (a.default.curCity && a.default.curCity.indexOf(o) >= 0) return !1
                }
                var i = a.default.wx_channel == B.WXChannel.BIAOCHE ? a.default.operationData.sceneIds : a.default.block_scene;
                return console.log("场景值：", a.default.curSceneId),
                    !(i.indexOf(a.default.curSceneId) < 0)
            },
            t.canShowMistakeBanner = function () {
                if (!a.default.curCity || a.default.curCity.indexOf("CHINA") >= 0) return a.default.isShowMistakeBanner = !1,
                    !1;
                for (var t = 0,
                    e = a.default.block_citys_mistakeBanner; t < e.length; t++) {
                    var o = e[t];
                    if (a.default.curCity && a.default.curCity.indexOf(o) >= 0) return a.default.isShowMistakeBanner = !1,
                        !1
                }
                return !((a.default.wx_channel == B.WXChannel.BIAOCHE ? a.default.operationData.sceneIds : a.default.block_scene_mistakeBannner).indexOf(a.default.curSceneId) < 0 && (a.default.isShowMistakeBanner = !1, 1))
            },
            t.showConfirmPanel = function (t, e, o, a) {
                return void 0 === o && (o = !1),
                    i(this, void 0, void 0,
                        function () {
                            var i;
                            return n(this,
                                function (n) {
                                    switch (n.label) {
                                        case 0:
                                            return [4, Y("prefab/confirmRewardPanel")];
                                        case 1:
                                            return i = n.sent(),
                                                cc.find("Canvas").addChild(i, 100),
                                                i.getComponent(_.default).initView(t,
                                                    function () {
                                                        e()
                                                    },
                                                    !1, o, a),
                                                [2];
                                    }
                                })
                        })
            },
            t.getPrefabNode = Y,
            t.loadPrefab = $,
            t.loadImg = function (t, e, o) {
                if (cc.loader.getRes(e)) {
                    var i = cc.loader.getRes(e);
                    t.spriteFrame = new cc.SpriteFrame(i);
                    var n = t.node.width / t.node.height;
                    t.node.width = 700,
                        t.node.height = 700 / n,
                        t.node.parent.setContentSize(cc.size(t.node.width, t.node.height)),
                        o && o()
                } else cc.loader.load({
                    url: e,
                    type: "png"
                },
                    function (e, i) {
                        if (i && i.isValid && i.height > 0) {
                            t.spriteFrame = new cc.SpriteFrame(i);
                            var n = t.node.width / t.node.height;
                            t.node.width = 700,
                                t.node.height = 700 / n,
                                t.node.parent.setContentSize(cc.size(t.node.width, t.node.height)),
                                o && o()
                        }
                    })
            },
            t.addTouchNode = function (e) {
                return i(this, void 0, void 0,
                    function () {
                        var o;
                        return n(this,
                            function (i) {
                                switch (i.label) {
                                    case 0:
                                        return [4, t.getPrefabNode("prefab/touchNode")];
                                    case 1:
                                        return o = i.sent(),
                                            cc.director.getScene().getChildByName("Canvas").addChild(o, 1e4),
                                            o.on("touchend",
                                                function () {
                                                    console.log("点击屏幕任意一处"),
                                                        o.destroy(),
                                                        e && e()
                                                }),
                                            [2];
                                }
                            })
                    })
            },
            t.startRecord = function () {
                t.is_tt() && b.default.instance.recordVideoStart()
            },
            t.stopRecord = function () {
                t.is_tt() && b.default.instance.recordVideoEnd()
            },
            t.shareRecordVideo = function () {
                t.is_tt() && b.default.instance.RecorderVideo_publish()
            };
        var et = 0;
        t.showPanelBackHome = function () {
            var e = a.default.nTotalGame % a.default.showPanelBackHome.length;
            if (P() && !a.default.bAuditMode && a.default.showPanelBackHome[e]) {
                var o = Math.floor(Math.round((new Date().getTime() - u.BaseStorage.getInt(c.BaseStorageKey.GoldAwardTime)) / 1e3) / 4),
                    i = (3 * o > 1800 ? 1800 : 3 * o) + a.default.spareCoin,
                    n = !1,
                    r = a.default.nDepotTime.am.star,
                    s = a.default.nDepotTime.am.end,
                    l = a.default.nDepotTime.pm.star,
                    d = a.default.nDepotTime.pm.end,
                    h = a.default.nDepotTime.ev.star,
                    p = a.default.nDepotTime.ev.end,
                    f = new Date().getHours();
                if (f >= r && f <= s) {
                    var m = c.BaseStorageKey.Receive + "am";
                    "1" == u.BaseStorage.getString(m) || (n = !0)
                }
                f >= l && f <= d && (m = c.BaseStorageKey.Receive + "pm", "1" == u.BaseStorage.getString(m) || (n = !0)),
                    f >= h && f <= p && (m = c.BaseStorageKey.Receive + "ev", "1" == u.BaseStorage.getString(m) || (n = !0)),
                    0 == et && (i >= 100 ? t.event_dispatcher.sendMessage("showAwardPanel") : et++),
                    1 == et && t.event_dispatcher.sendMessage("onEventBtnLottery"),
                    2 == et && t.event_dispatcher.sendMessage("onEventBtnDaily"),
                    3 == et && (n ? t.event_dispatcher.sendMessage("onEventBtnDepot") : et++),
                    4 == et && t.event_dispatcher.sendMessage("onEventBtnTask"),
                    ++et > 4 && (et = 0)
            }
        }
    })(o.Util || (o.Util = {}))